package com.example.designpatterns.chain;

/**
 * 具体处理类1
 * 批请假3天内，含三天
 */
public class LeaderT1 extends Leader{

    public  LeaderT1(String name){
        super(name);
    }
    @Override
    public void handleRequest(LeaveNode leaveNode){
        if(leaveNode.getNumber() <=3){
            System.out.println("T1:"+ name+",审批:" +leaveNode.getPerson()+"假条，天数："+ leaveNode.getNumber());
        }else {

            if(this.successor != null){
                this.successor.handleRequest(leaveNode);
            }
        }
    }
}
